const app = getApp();
Page({
    /** 页面的初始数据 **/
    data: {
        leftList: [],
        rightList: []
    },
    onLoad(){
        this.getList();
    },
    getList(){
        app.get('/show/list').then(res => {
            let list = res.data;
            let leftList = list.filter((item,index) => index % 2 === 0);
            let rightList = list.filter((item,index) => index % 2 !== 0);
            this.setData({
                leftList,
                rightList,
            },() => {
                wx.hideLoading();
            });
        }).catch(err => {
            console.log(err);
        })
    }
})